Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Return io error other than NotExist refreshing config #38924

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

congqixia
Copy link
Contributor

@congqixia congqixia commented Jan 2, 2025

Related to #38923

This PR:

  • Check whether os.Stat config file error is io.ErrNotExist
  • Panic when get config return error during Milvus initialization

@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: congqixia

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sre-ci-robot sre-ci-robot added approved size/S Denotes a PR that changes 10-29 lines. labels Jan 2, 2025
@mergify mergify bot added dco-passed DCO check passed. kind/bug Issues or changes related a bug labels Jan 2, 2025
Copy link
Contributor

mergify bot commented Jan 2, 2025

@congqixia go-sdk check failed, comment rerun go-sdk can trigger the job again.

Copy link
Contributor

mergify bot commented Jan 2, 2025

@congqixia E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

Copy link

codecov bot commented Jan 2, 2025

Codecov Report

Attention: Patch coverage is 56.25000% with 7 lines in your changes missing coverage. Please review.

Project coverage is 81.15%. Comparing base (182cac0) to head (171ff56).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
pkg/config/config.go 25.00% 2 Missing and 1 partial ⚠️
pkg/config/file_source.go 72.72% 3 Missing ⚠️
pkg/config/refresher.go 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #38924   +/-   ##
=======================================
  Coverage   81.14%   81.15%           
=======================================
  Files        1388     1388           
  Lines      196538   196546    +8     
=======================================
+ Hits       159485   159498   +13     
+ Misses      31463    31460    -3     
+ Partials     5590     5588    -2     
Components Coverage Δ
Client 79.53% <ø> (ø)
Core 69.53% <ø> (ø)
Go 83.10% <56.25%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
pkg/config/refresher.go 93.87% <0.00%> (+1.87%) ⬆️
pkg/config/config.go 65.21% <25.00%> (-3.44%) ⬇️
pkg/config/file_source.go 81.37% <72.72%> (+3.47%) ⬆️

... and 25 files with indirect coverage changes

@congqixia
Copy link
Contributor Author

rerun go-sdk

@congqixia
Copy link
Contributor Author

/run-cpu-e2e

Copy link
Contributor

mergify bot commented Jan 2, 2025

@congqixia go-sdk check failed, comment rerun go-sdk can trigger the job again.

@congqixia
Copy link
Contributor Author

go-sdk

@congqixia
Copy link
Contributor Author

rerun go-sdk

Copy link
Contributor

mergify bot commented Jan 2, 2025

@congqixia go-sdk check failed, comment rerun go-sdk can trigger the job again.

@congqixia
Copy link
Contributor Author

rerun go-sdk

Copy link
Contributor

mergify bot commented Jan 2, 2025

@congqixia go-sdk check failed, comment rerun go-sdk can trigger the job again.

@congqixia
Copy link
Contributor Author

rerun go-sdk

@mergify mergify bot added the ci-passed label Jan 2, 2025
pkg/config/refresher.go Outdated Show resolved Hide resolved
if os.IsNotExist(err) {
continue
}
return err
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make sure the err thrown here is properly handled?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

according to discussion offline, this error shall be handled by caller

@mergify mergify bot removed the ci-passed label Jan 3, 2025
Copy link
Contributor

mergify bot commented Jan 3, 2025

@congqixia go-sdk check failed, comment rerun go-sdk can trigger the job again.

@tedxu
Copy link
Contributor

tedxu commented Jan 3, 2025

/lgtm

@sre-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@sre-ci-robot sre-ci-robot added size/M Denotes a PR that changes 30-99 lines. and removed size/S Denotes a PR that changes 10-29 lines. labels Jan 3, 2025
Related to milvus-io#38923

This PR:

- Check whether `os.Stat` config file error is io.ErrNotExist
- Panic if refresher get error

Signed-off-by: Congqi Xia <[email protected]>
Signed-off-by: Congqi Xia <[email protected]>
@congqixia congqixia force-pushed the fix/return_not_notexist_ioerror branch from 42bca18 to 171ff56 Compare January 7, 2025 07:38
@mergify mergify bot added the ci-passed label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved ci-passed dco-passed DCO check passed. kind/bug Issues or changes related a bug size/M Denotes a PR that changes 30-99 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants